<template>
  <div class="nav-container">
    <router-view></router-view>
    <nav class="nav-bar">
      <ul>
        <li><router-link to="/layout/index">首页</router-link></li>
        <li><router-link to="/layout/findfang">找房</router-link></li>
        <li><router-link to="/layout/zixun">咨询</router-link></li>
        <li><router-link to="/layout/my">我的</router-link></li>
      </ul>
    </nav>
  </div>
</template>

<script>
export default {
  name: 'BottomNav',
}
</script>

<style lang='less' scoped>
.nav-container {
  position: relative;
  height: 100%;
}

.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #fff;
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.1);
}

nav ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav ul li {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 25%;
  height: 100%;
  color: #666666;
}

nav ul li a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  font-size: 0.8rem;
  color: inherit;
  text-decoration: none;
}

nav ul li a.router-link-active {
  color: #007aff;
}
</style>